import React from 'react';
import { Modal, Button,} from 'antd';
import { Input } from 'antd';
import { connect } from 'react-redux'
import {AddCompany} from '../../redux/company/company'
@connect(
    state => state,
    { AddCompany}
)
export default class AddPwdModel extends React.Component {
    constructor(){
        super();
    }
    handleOk(){
        let oldPassword = document.getElementById('oldPassword').value
        let newPassword = document.getElementById('newPassword').value
        this.props.addPwd(oldPassword,newPassword)
    }
    render() {
        
        return (
            <Modal
              title="修改密码"
              visible={this.props.visible} 
              onOk={this.handleOk.bind(this)}
              wrapClassName="submiss"
              onCancel={()=>this.props.showModel()}
            >
             <div style={{width:'100%',margin:'0 auto',textAlign:'center'}}>
               <div style={{paddingBottom:20}}>原密码: <Input id='address' placeholder="必填" style={{width:200}}/></div>
               <div style={{paddingBottom:20}}>新密码: <Input id='phone' placeholder="必填" style={{width:200}}/></div>
             </div>
            </Modal>
        );
    }
}